Map = [[2] * 7 for _ in range(7)]
dir = [(-1, 0), (0, -1), (0, 1), (1, 0)]
for i in range(7):
    if i == 0 or i == 1 or i == 5 or i == 6:
        Map[i][2 : 5] = list(map(int, input()))
    else:
        Map[i][0:7] = list(map(int, input()))

def panduan():
    for i in range(7):
        for j in range(7):
            if Map[i][j] == 1:
                for x, y in dir:
                    nx, ny = i + x, j + y
                    if 0 <= nx < 7 and 0 <= ny < 7:
                        if Map[nx][ny] == 1:
                            return False
    return True

print('yes' if panduan() else 'no')
